public class Task
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private User |
creator |
private boolean |
creatorAccepted |
private java.sql.Time |
deadline |
private java.lang.String |
description |
private Position |
location |
private double |
price |
private User |
runner |
private boolean |
runnerFinished |
private java.sql.Time |
startTime |
Constructor and Description |
---|
Task(User creator,
java.lang.String description,
java.sql.Time startTime,
java.sql.Time deadline,
double price)
Create a new task
|
Modifier and Type | Method and Description |
---|---|
User |
getCreator()
Get the creator of the Task
|
java.sql.Time |
getDeadline()
Get deadline
|
java.lang.String |
getDescription()
Get description
|
Position |
getLocation()
Get current location
|
double |
getPrice()
Get current price
|
User |
getRunner()
See who is running the Task
|
java.sql.Time |
getStartTime()
Get start time
|
boolean |
isRunnerFinished()
Check to see if the runner finished the task
|
void |
runnerFinished()
Set the task to be finished
|
void |
setDeadline(java.sql.Time deadline)
Set new deadline
|
void |
setDescription(java.lang.String description)
Set new description
|
void |
setLocation(Position location)
Set new location
|
void |
setPrice(double price)
Set new price
|
void |
setRunner(User runner)
Change the runner
|
void |
setStartTime(java.sql.Time startTime)
Set start time
|
private java.lang.String description
private java.sql.Time startTime
private java.sql.Time deadline
private double price
private Position location
private User creator
private User runner
private boolean runnerFinished
private boolean creatorAccepted
public Task(User creator, java.lang.String description, java.sql.Time startTime, java.sql.Time deadline, double price)
description
- the name of the taskstartTime
- the start time of the taskdeadline
- the deadline of the taskprice
- the price of the taskpublic void runnerFinished()
public boolean isRunnerFinished()
public java.sql.Time getStartTime()
public void setStartTime(java.sql.Time startTime)
startTime
- the new start timepublic java.sql.Time getDeadline()
public void setDeadline(java.sql.Time deadline)
deadline
- the new deadlinepublic double getPrice()
public void setPrice(double price)
price
- the new pricepublic Position getLocation()
public void setLocation(Position location)
location
- the new locationpublic User getCreator()
public User getRunner()
public void setRunner(User runner)
runner
- the new runnerpublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- the new description